import { match } from "ts-pattern";

import type { MutationResolvers } from "./../../../types.generated";
export const markBookAsRead: NonNullable<MutationResolvers['markBookAsRead']> = async (_parent, _arg, _ctx) => {
  return {
    id: "001",
    fullName: "J. R. R. Tolkien",
    isAdmin: true,
    isbn: "",
  };
  /*
  var result = {code:1, data:{
    id: "001",
    fullName: "J. R. R. Tolkien",
    isAdmin: true,
    isbn: "",
  }};
  return match(result)
        .with({code: 0}, (res)=>null)
        .with({code: 1}, (res)=>res.data)
        .exhaustive();
        */
};
